package com.tgu.home_action.pojo;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Timestamp;

@Data
@ApiModel(description = "动态")
public class Dynamic {
    @ApiModelProperty("动态ID")
    private Integer id;
    @ApiModelProperty("案件ID")
    private Integer caseId;
    @ApiModelProperty("家属ID")
    private Integer FamilyId;
    @ApiModelProperty("志愿者ID")
    private Integer VolunteerId;
    @ApiModelProperty("时间")
    private Timestamp time;
    @ApiModelProperty("行为ID(1为发布案件，2为完成案件，3为取消案件，4为案件已归档，5为志愿者加入案件，6为志愿者退出案件，7为志愿者匹配人脸成功)")
    private Integer actionId;
    @ApiModelProperty("操作人姓名")
    private String name;
    @ApiModelProperty("操作人头像")
    private String avatarUrl;

    @JsonBackReference("当前页")
    @ApiModelProperty("当前页")
    private Integer pageNo;

    @JsonBackReference("每页条数")
    @ApiModelProperty("每页条数")
    private Integer pageSize;

    @JsonIgnore
    private Integer startSize;


    public Dynamic() {
    }

    public Dynamic(Integer caseId, Integer familyId, Integer volunteerId, Integer actionID, String name, String avatarUrl) {
        this.caseId = caseId;
        FamilyId = familyId;
        VolunteerId = volunteerId;
        this.actionId = actionID;
        this.name = name;
        this.avatarUrl = avatarUrl;
    }
}
